<?php
if($product):
$titlePr = 'title'.$rear;
$aliasPr = 'alias'.$rear;

$tygia = $this->common_model->getone('setting',array('id'=>1),array('tygia'));
$tygia = $tygia->tygia;
if(is_numeric($tygia)){}else{$tygia = 21000;}
$currency = $this->session->userdata('currency');
?>
<div class="module-product">
	<div class="product-title title-pro">
		<div class="box-title">
			<h3><?php echo $category->$titlePr ?></h3>
			
		</div>
	</div><!-- end highlight-title -->
	
	<div class="product-content content-pro">
    <?php 
    $i = 0;
    $col = 4;
    echo '<ul class="clearfix">';
    foreach($product as $pr){
		 ?>
			<li>
				<img height="121px" width="164px" alt="<?php echo $pr->$titlePr; ?>" src="<?php if(empty($pr->image)){$pr->image='/images/so_006.png';} echo base_url().$pr->image; ?>" />
				<p>ID:<?php echo $pr->code; ?></p>
				<p><a href="<?php echo base_url().$this->lang->line('detail_product_link').$pr->$aliasPr.'.html'; ?>" title="<?php echo $pr->$titlePr; ?>"><?php echo $pr->$titlePr; ?></a></p>
				<p><?php echo $this->lang->line('price') ?>: <span><?php if($currency == 'usd'){$gia = $pr->price/$tygia;$gia = round($gia,3);$money = ' USD';}else {$gia = $pr->price;$money = ' VND';} echo $gia.$money; ?></span></p>
			</li>
            <?php 
        $i ++;
		if($i % $col == 0){
            echo '</ul><ul class="clearfix">';
		}
	} ?>
    </ul>
    <div class="phantrang"><?php echo $this->pagination->create_links();?></div>
	</div><!-- end content-news-->
	
	<div class="bottom-pro">
	</div><!-- end bottom-pro-->
	
</div><!--end prohighlight-content -->
<?php
endif;
?>